<div class="col-md-2">
  <%= render :partial => "search/nav", :locals => { :section => "search-wikis" } %>
</div>

<div class="col-md-10">
 <div class="container">

   <h2>Search wikis</h2>

   <%= render partial: "search/form", locals: { searchType: "wikis/" } %>

   <% if @wikis.present? %>

     <h4>Results for "<b><%= params[:query] %></b>":</h4>

     <div class="related-tags-container">
       <%= render partial: 'tag/related', locals: { tags: Tag.related(params[:query]) } if params[:query] %>
     </div>

     <%= render partial: 'search/pinned', locals: { query: params[:query] } if params[:query] %>

     <div class="list-group">
       <ul class="nav nav-pills">
         <li class="nav-item">
           <%= link_to "Most liked", url_for(:order => :likes), :class => "nav-link list-group-item list-group-item-action #{params[:order].to_s.to_sym == :likes ? "active" : ""}"%>
         </li>
          <li class="nav-item">
            <%= link_to "Most viewed", url_for(:order => :views), :class => "nav-link list-group-item list-group-item-action #{params[:order].to_s.to_sym == :views ? "active" : ""}"%>
          </li>
          <li class="nav-item">
            <%= link_to "Most recent", url_for(:order => :default), :class => "nav-link list-group-item list-group-item-action #{params[:order].to_s.to_sym == :default ? "active" : ""}"%>
          </li>
          <li class="nav-item">
            <%= link_to "Boolean search", url_for(:order => :natural, :type => :boolean), :class => "nav-link list-group-item list-group-item-action #{params[:order].to_s.to_sym == :natural && params[:type].to_s.to_sym == :boolean ? "active" : ""}"%>
          </li>
          <li class="nav-item">
            <%= link_to "Natural search", url_for(:order => :natural, :type => :natural), :class => "nav-link list-group-item list-group-item-action #{params[:order].to_s.to_sym == :natural && params[:type].to_s.to_sym == :natural ? "active" : ""}"%>
          </li>
          <li class="nav-item">
            <a class="nav-link list-group-item list-group-item-action" href="/search-help"><i class="fa fa-question"></i></a>
          </li>
       </ul>
     </div>
     <%= render partial: "wiki/wikis", locals: { wiki: @wikis } %>
   <% else %>
     <p>No results found for "<b><%= params[:query] %></b>" :-(</p>
     <p>Try searching <a href="/search/content/<%= params[:query] %>">all content</a></p>
   <% end %>
 </div>
</div>
